<h1>Manage Page</h1>


<div style="background:#E1E1E1;"> 
Add New Page
<form action="<?php echo site_url('page/addNewPage')?>" method="post">
Controller : <input type="text" name="new_page[controller]" id="new_page_controller">
Action : <input type="text" name="new_page[action]" id="new_page_action">
<input type="submit" value="Submit">
</form>
</div>
<hr>
<div style="background:#E1E1E1;"> 
Add New Message

<form action="<?php echo site_url('page/addNewMessage')?>" method="post">
Name : <input type="text" name="new_message[name]" id="new_message_name">
Type : <input type="text" name="new_message[type]" id="new_message_type">
Value : <input type="text" name="new_message[value]" id="new_message_value">
<input type="submit" value="Submit">
</form>
</div>
<hr>
<div style="background:#E1E1E1;"> 
Add New Message to a page
<form action="<?php echo site_url('page/addNewMessageToPage')?>" method="post">
Page :<select name="page_message[page_id]">
<?php foreach($pagedata as $pd){ ?>
<option value="<?php echo $pd['id'];?>"><?php echo $pd['controller']."/".$pd['action'];?></option>
<?php }?>
</select>
<br>
Message :<select name="page_message[message_id]">
<?php foreach($messagedata as $md){ ?>
<option value="<?php echo $md['id'];?>"><?php echo $md['name']." (".$md['value'].")";?></option>
<?php }?>
</select>
<input type="text" name="page_message[variable_name]">
<input type="submit" value="Submit">
</form>
</div>

<hr>
<div style="background:#E1E1E1;"> 
Delete Message from a page
<form action="<?php echo site_url('page/deleteMessageFromPage')?>" method="post">
Message :<select name="delete_pagemessage[pagemessage_id]">
<?php foreach($pagemessagedata as $pmd){ ?>
<option value="<?php echo $pmd['id'];?>"><?php echo $pmd['controller']."/".$pmd['action']." -> ". $pmd['variable_name']." : ". $pmd['name']." (".$pmd['value'].")";?></option>
<?php }?>
</select>
<input type="submit" value="Delete">
</form>
</div>
<hr>

<div style="background:#E1E1E1;"> 
Modify Message
<form action="<?php echo site_url('page/modifyMessage')?>" method="post">
Message :<select name="modify_message[id]" id="modify_message_id">
<?php foreach($messagedata as $md){ ?>
<option value="<?php echo $md['id'];?>" ><?php echo $md['name']." (".$md['value']."), type : ".$md['type'];?></option>
<?php }?>
</select>
Type : <input type="text" name="modify_message[type]" id="modify_message_type">
Value : <input type="text" name="modify_message[value]" id="modify_message_value">
<input type="submit" value="Submit">
</form>
</div>


<h1>Manage Lists</h1>

<div style="background:#E1E1E1;"> 
Add State
<form action="<?php echo site_url('page/addNewState')?>" method="post">
State Variable : <input type="text" name="add_state[name]" id="add_state_name">
State Name: <input type="text" name="add_state[value]" id="add_state_value">
<input type="submit" value="Submit">
</form>
</div>



